#pragma once

#include<stdio.h>
#include<string.h>
#include<assert.h>
#include<stdlib.h>



#define max 100
#define max_name 12
#define max_sex 6
#define max_age 6
#define max_addr 30
#define max_phonenum 13

#define DEFAULT_SZ 3
#define INT_SZ 2

struct peoinf
{
	char name[max_name];
	char sex[max_sex];
	int age;
	char addr[max_addr];
	char phonenum[max_phonenum];
};
//struct contact
//{
//	struct peoinf data[max];
//	int sz;
//};
struct contact
{
	struct peoinf* data;
	int sz;
	int capacity;
};


void Init_con(struct contact* con);
void add_con(struct contact* con);
void show_con(const struct contact* con);
void search_con(const struct contact* con);
void del_con( struct contact* con);
void modifi_con(struct contact* con);
void sort_con(struct contact* con);

void Destroy_con(struct contact* pc);
void Save_con(struct contact* pc);